package com.zsxb.crm.controller;

import com.zsxb.crm.pojo.SysStatus;
import com.zsxb.crm.result.Result;
import com.zsxb.crm.service.DictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/system/dict")
public class DictController {
    @Autowired
    private DictService dictService;

    /**
     * 显示状态 显示/隐藏
     */
    @GetMapping("/data/type/sys_show_hide")
    public Result<List<SysStatus>> showOrHide(){
        return Result.success(dictService.showOrHide());
    }

    /**
     * 菜单状态 启用/禁用
     */
    @GetMapping("/data/type/sys_normal_disable")
    public Result<List<SysStatus>> normalOrDisable(){
        return Result.success(dictService.normalOrDisable());
    }

}
